package com.liuyang.concurrency.chapter10;

import java.util.Collection;
import java.util.concurrent.TimeoutException;

public interface Lock {
    void lock() throws InterruptedException;
    void lock(long mills) throws  InterruptedException, TimeoutException;
    void unlock();

    Collection<Thread> getBlockedThread();

    int getBlockedSize();
}

class TimeOutException extends Exception{
    public TimeOutException(String message){
        super(message);
    }
}
